<!-- $Id: comment_list.htm 14216 2008-03-10 02:27:21Z testyang $ -->

{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<div class="form-div">
  <form action="javascript:searchComment()" name="searchForm">
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
    按评论内容搜索 <input type="text" name="keyword" /> <input type="submit" class="Button" value="{$lang.button_search}" />
  </form>
</div>

<form method="POST" action="share_comment_manage.php?act=batch_drop" name="listForm" onsubmit="return confirm_bath()">

<!-- start comment list -->
<div class="list-div" id="listDiv">
{/if}

<table cellpadding="3" cellspacing="1">
  <tr>
    <th>
      <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox">
      <a href="javascript:listTable.sort('id'); ">序号</a></th>
	  <th><a href="javascript:listTable.sort('sid'); ">晒单序号</a></th>
    <th><a href="javascript:listTable.sort('uname'); ">会员名</a></th>
   <th style="width:50px;word-wrap;word-break"  ><a href="javascript:listTable.sort('content'); ">内容</a></th>
   
   
    <th><a href="javascript:listTable.sort('add_time'); ">评论时间（审核时间）</a></th>
    <th>状态</th>
    <th>{$lang.handler}</th>
  </tr>
  {foreach from=$comment_list item=comment}
  <tr>
    <td><input value="{$comment.id}" name="checkboxes[]" type="checkbox">{$comment.id}</td>
    <td align="center"><a href="share.php?act=info&id={$comment.sid}">{$comment.sid}</a></td>
    <td align="center">{if $comment.uname}{$comment.uname}{else}匿名用户{/if}</td>
    <td  align="center"  align="center"><p style="padding:0 5px;margin:2px;width:300px; word-wrap: break-word;">{$comment.content}</p></td>
   
    <td align="center">{$comment.add_time}{if $comment.status neq 0}（{$comment.check_time}）{/if}</td>
    <td align="center">{if $comment.status eq 0}未审核{elseif $comment.status eq 1}审核通过{else}审核不通过{/if}</td>
    <td align="center">
      <a href="javascript:" onclick="listTable.remove({$comment.id}, '确定移除？')">移除</a>
    </td>
  </tr>
    {foreachelse}
    <tr><td class="no-records" colspan="10">尚无评论记录</td></tr>
    {/foreach}
  </table>

  <table cellpadding="4" cellspacing="0">
    <tr>
      <td>
      <div>
      <select name="sel_action">
        <option value="remove">移除</option>
        <option value="reset">重置为未审核</option>
        <option value="allow">审核通过</option>
        <option value="deny">审核不通过</option>
      </select>
      <input type="hidden" name="act" value="batch" />
      <input type="submit" name="drop" id="btnSubmit" value="{$lang.button_submit}" class="button" disabled="true" /></div></td>
      <td align="right">{include file="page.htm"}</td>
    </tr>
  </table>

{if $full_page}
</div>
<!-- end comment list -->

</form>
<script type="text/javascript" language="JavaScript">

  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};
  cfm = new Object();
  cfm['allow'] = '{$lang.cfm_allow}';
  cfm['remove'] = '{$lang.cfm_remove}';
  cfm['deny'] = '{$lang.cfm_deny}';

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}

  {literal}
  onload = function()
  {
      document.forms['searchForm'].elements['keyword'].focus();
      // 开始检查订单
      startCheckOrder();
  }
  /**
   * 搜索评论
   */
  function searchComment()
  {
      var keyword = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
//      if (keyword.length > 0)
//      {
        listTable.filter['keywords'] = keyword;
        listTable.filter.page = 1;
        listTable.loadList();
//      }
//      else
//      {
//	  		
//          document.forms['searchForm'].elements['keyword'].focus();
//      }
  }
  {/literal}

  function confirm_bath()
  {
    var action = document.forms['listForm'].elements['sel_action'].value;

    return confirm('确定执行？');
  }
//-->
</script>
{include file="pagefooter.htm"}
{/if}